package com.firefly.dao.dto.cms;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @description: 分类
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2022/12/13
 **/
@Data
@EqualsAndHashCode
public class TypeDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Positive(groups = {update.class},message = "ID是大于0的整数")
    private Integer id;
    @PositiveOrZero(groups = {create.class},message = "父级分类ID输入大于0的整数")
    @NotNull(groups = {create.class},message = "父级分类ID输入大于0的整数")
    private Integer parentId;
    @NotBlank(groups = {create.class,update.class},message = "名称必填")
    private String name;
    @PositiveOrZero(groups = {create.class,update.class},message = "排序输入大于等于0的整数")
    private Integer sort;
    public interface create{};
    public interface update{};
}
